package edu.jd.movieplatform.search.movie.impl;

import edu.jd.movieplatform.search.movie.Movie;
import edu.jd.movieplatform.search.movie.MovieDto;
import edu.jd.movieplatform.search.movie.MovieService;
import edu.jd.movieplatform.search.movie.dao.MovieDao;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import javax.annotation.Resource;
import java.util.List;

@Service
@Transactional
public class MovieServiceImpl implements MovieService {

    @Resource
    private MovieDao movieDao;

    @Override
    public List<Movie> getMovieList(MovieDto dto) {
        return movieDao.findMovieListByCondition(dto);
    }

    @Override
    public List<Movie> getMovieByKeyword(String keyword){
        return movieDao.findMovieByKeyword(keyword);
    }

}
